package ru.ng.sample.ui.test;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

/**
 * User: NGorosh
 * Date: 22.03.11
 * Time: 11:00
 */
@Controller( "HelloWorldController" )
@RequestMapping( "/hello_world" )
public class HelloWorldController
{

    private static final Logger log = Logger.getLogger( HelloWorldController.class );

    @RequestMapping( method = RequestMethod.GET )
    public ModelAndView helloWorld()
    {
        log.debug( "hello World method!!!!!" );
        ModelAndView mav = new ModelAndView( "hello_world" );
        mav.addObject( "message", "Hello World!" );
        return mav;
    }


}
